package com.wang.designpattern.decorator;

public abstract class Drink {
    // 描述
    public String desc;
    // 单价
    private float price = 0.0f;

    public String getDesc() {
        return desc + " " + getPrice();
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public float getPrice() {
        return price;
    }

    public void setPrice(float price) {
        this.price = price;
    }

    // 计算费用的抽象方法，子类来实现
    public abstract float cost();
}
